﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApplication1
{
    public partial class Site1 : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["UserInfo"] == null)
            {
                lblLogState.Text = "未登录";
                PanelUnlogged.Visible = true;
                PanelLogged.Visible = false;
            }
            else
            {
                lblLogState.Text = "Welcome " + ((Entity.UserInfo)Session["UserInfo"]).UserName;
                PanelUnlogged.Visible = false;
                PanelLogged.Visible = true;
            }
        }

        protected void lbtLogin_Click(object sender, EventArgs e)
        {
            Response.Redirect("Login.aspx");
        }

        protected void lbtReg_Click(object sender, EventArgs e)
        {
            Response.Redirect("regUser.aspx");
        }

        protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
        {
            Response.Redirect("~/Search.aspx");
        }

        protected void ImageButton2_Click(object sender, ImageClickEventArgs e)
        {
            Response.Redirect("~/Search.aspx");
        }

        protected void lbtLogout_Click(object sender, EventArgs e)
        {
            Session.RemoveAll();
            Response.Redirect("~/Search.aspx");
        }

        protected void ibtXueQianJiaoYu_Click(object sender, ImageClickEventArgs e)
        {
            Response.Redirect("~/NavigationResult.aspx?TagName=学前教育");
        }

        protected void ibtXiaoXueJiaoYu_Click(object sender, ImageClickEventArgs e)
        {
            Response.Redirect("~/NavigationResult.aspx?TagName=小学教育");
        }

        protected void ibtChuZhongJiaoYu_Click(object sender, ImageClickEventArgs e)
        {
            Response.Redirect("~/NavigationResult.aspx?TagName=初中教育");
        }

        protected void ibtGaoZhongJiaoYu_Click(object sender, ImageClickEventArgs e)
        {
            Response.Redirect("~/NavigationResult.aspx?TagName=高中教育");
        }

        protected void ibtDaXueJiaoYu_Click(object sender, ImageClickEventArgs e)
        {
            Response.Redirect("~/NavigationResult.aspx?TagName=大学教育");
        }

        protected void ibtZhuanShengBen_Click(object sender, ImageClickEventArgs e)
        {
            Response.Redirect("~/NavigationResult.aspx?TagName=专升本");
        }

        protected void ibtLiuXue_Click(object sender, ImageClickEventArgs e)
        {
            Response.Redirect("~/NavigationResult.aspx?TagName=留学");
        }

        protected void ibtYiShu_Click(object sender, ImageClickEventArgs e)
        {
            Response.Redirect("~/NavigationResult.aspx?TagName=艺术");
        }

        protected void lbtpersoncenter_Click(object sender, EventArgs e)
        {
            Response.Redirect("~/PersonCenter.aspx");
        }
    }
}